/*
 * Phone.h
 *
 *  Created on: 19 ��� 2010
 *      Author: Sartios
 */

#ifndef TEACHERPHONE_H_
#define TEACHERPHONE_H_

#include "../../Phone/IPhone.h"
#include "../../../Teachers/ITeacher.h"

/**
 * This object contains a teacher and a phone which depend on each other.
 * The phone, actually is, Teacher's Phone
 */
class TeacherPhone {
public:
	/**
	 * Sets teacher and phone to NULL
	 */
	TeacherPhone();
	/**
	 * Sets teacher and phone to the parameters
	 * \param IPhone *, a concrete phone which implements IPhone interface
	 * \param ITeacher *, a concrete teacher which implements ITeacher interface
	 */
	TeacherPhone(const IPhone *phone,const ITeacher *teacher);

	/**
	 * Deletes the pointers to phone and to teacher
	 */
	virtual ~TeacherPhone();
	/**
	 *	Setup the owner of the phone
	 *	\param	ITeacher *, an object which implements ITeacher interface
	 *	\return	void
	 */
	virtual	void		setOwner(const ITeacher *teacher);

	/**
	 *	Return the owner of the phone
	 *	\param	void
	 *	\return	ITeacher *, object which impelements ITeacher interface
	 */
	virtual ITeacher *  getOwner()const;
	/**
	 *	Sets the phone
	 *	\param IPhone *, an object which implements IPhone interface
	 */
	virtual	void		setPhone(const IPhone *phone);
	/**
	 *	Returns the phone
	 *	\param void
	 *	\return IPhone	*, object which implements IPhone interface
	 */
	virtual IPhone	*	getPhone()const;
private:
	ITeacher	*owner_;
	IPhone		*phone_;
};

#endif /* TEACHERPHONE_H_ */
